#!/bin/bash

mysql_count=$(netstat -atlnp | grep LISTEN | grep 3307 | wc -l)


if [ ${mysql_count} -eq 0 ];then

     sleep 2

     mysql_count=$(netstat -atlnp | grep LISTEN | grep 3307 | wc -l)

     if [ ${mysql_count} -eq 0 ];then

	killall keepalived
     #else
	#systemctl start keepalived
     fi
fi

